Repository navigation
test: add 7 test files covering uncovered code paths - #302
Conversation
Add unit tests for deepin-draw covering lcov-uncovered branches across cgraphicsview.cpp, idrawtool.cpp, and cmasicotool.cpp: - test_pageview_textundo_redo.cpp: slotOnTextUndo/Redo with text item in edit state (lines 1296-1299, 1307-1310) - test_pageview_contextmenu_ext.cpp: contextMenuEvent shield branch (lines 795-797), setTextAlignMenuActionStatus else branch (lines 1619-1621) - test_pageview_alignment_dynlayer.cpp: alignmentMovPos default branch with AlignCenter (lines 1548-1550), updateSelectedItemsAlignment JDynamicLayer branch (line 1507) - test_pageview_eventfilter_gesture.cpp: eventFilter space+drag scroll (lines 1697-1724), gestureEvent pinchTriggered (line 1757) - test_idrawtool_dblclick.cpp: mouseDoubleClickEvent synthesized and normal branches (lines 177-191), dueTouchDoubleClickedStart touch double-click (lines 253-254, 560-583) - test_idrawtool_touchfinish.cpp: toolDoFinish cache disable (lines 460-463), toolDoUpdate touch sensitivity (lines 355-360, 381-384) - test_cmasicotool_groups.cpp: getBlurEnableItems group branch (lines 88-94), saveItemZValue group recursion (lines 132-137), toolStart no-blur path (lines 244-247), toolFinish clearCommand (lines 332-336), JDynamicLayer blurBegin/blurEnd Issue: V-9581 Log: add 7 test files covering uncovered code paths
d954ac1 to
d2f02cd
Compare
Reviewer's GuideTestsTest PageView text undo and redo behavior for text items both in and out of edit state.
Test context-menu suppression and text-alignment action states for auto-adjusting and fixed-size text items.
Test alignment calculations and selected-item alignment when a dynamic layer is present.
Test space-drag scrolling and pinch-gesture handling in PageView.
Test synthesized and normal mouse double-click handling, plus touch and mouse double-click detection in IDrawTool.
Test IDrawTool cache disabling on finish and touch-sensitivity behavior at different movement distances.
Test blur-tool group item collection and z-value recursion, no-blur flows, and dynamic-layer blur lifecycle.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, wyu71 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary
Add 7 unit test files (30 test cases total) covering lcov-uncovered branches in
cgraphicsview.cpp,idrawtool.cpp, andcmasicotool.cpp.Test Files
test_pageview_textundo_redo.cppslotOnTextUndo/slotOnTextRedowith text item in edit statetest_pageview_contextmenu_ext.cppcontextMenuEventshield branch,setTextAlignMenuActionStatuselse branchtest_pageview_alignment_dynlayer.cppalignmentMovPosdefault (AlignCenter),updateSelectedItemsAlignmentJDynamicLayer branchtest_pageview_eventfilter_gesture.cppeventFilterspace+drag scroll,gestureEvent→pinchTriggeredtest_idrawtool_dblclick.cppmouseDoubleClickEventbranches,dueTouchDoubleClickedStarttouch/mouse double-clicktest_idrawtool_touchfinish.cpptoolDoFinishcache disable,toolDoUpdatetouch sensitivity radiustest_cmasicotool_groups.cppgetBlurEnableItemsgroup,saveItemZValuegroup recursion, blur tool flowsVerification
All 30 new test cases pass under
QT_QPA_PLATFORM=offscreen. Existing tests continue to pass.Summary by Sourcery
Expand unit-test coverage across uncovered graphics-view and drawing-tool code paths.
Tests: